package Operation;

import Book.BookList;
import User.User;
/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 石方旭
 * Date: 2022-04-13
 * Time: 12:30
 */
public class ExitSystem implements IOperation{
    @Override
    public void work(BookList book) {
        System.out.println("退出系统");
        System.exit(0);
        //退出系统后要把所有元素设置为null
        for(int i =0;i< book.getUsedSize();++i) {
           book.setPos(i,null);
        }
        book.setUsedSize(0);
    }
}
